Imputation

source("spline_mice.R", local = knitr::knit_global())
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.7222222222222, 84.7444444444444, 103.2, 120.088888888889, 135.511111111111, 149.533333333333, 163.055555555556, 176.277777777778))  + bs(wgt, knots = c(5.38833333333333, 7.325, 9.21, 11.7933333333333, 24.2, 38.3, 53.1666666666667, 69.1333333333333))"
## [1] "target ~  reg  + bs(age, knots = c(1.03460339189292, 2.6052171267777, 5.62993383527264, 8.67611084803014, 10.4817096357137, 12.7683908245012, 15.1798615864324, 17.6675820325541))  +  sex  + bs(wgt, knots = c(5.45944444444444, 7.50777777777778, 9.48666666666667, 12.3955555555556, 25.9, 39.7333333333333, 54.5222222222222, 69.9111111111111))"
## [1] "target ~  reg  + bs(age, knots = c(1.00786136596716, 2.48870636550308, 5.37987679671458, 8.290212183436, 10.321697467488, 12.4218479517071, 14.8665297741273, 17.4401095140315))  +  sex  + bs(hgt, knots = c(68.2888888888889, 84.7777777777778, 103.904175863099, 123.211111111111, 139.034299551561, 151.664514257044, 165.503895808581, 175.721790429624))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.1888888888889, 85.2777777777778, 103.566666666667, 120.911111111111, 136.544444444444, 150.633333333333, 164.122222222222, 177.622222222222))  + bs(wgt, knots = c(5.38444444444444, 7.28888888888889, 9.25166666666667, 11.7772222222222, 24.2222222222222, 38.4666666666667, 53.4111111111111, 68.6555555555555))"
## [1] "target ~  reg  + bs(age, knots = c(1.02456460567343, 2.46708379484718, 5.40451745379877, 8.53686382678062, 10.5395087078865, 12.7449059594177, 15.0959008289604, 17.7207810824776))  +  sex  + bs(wgt, knots = c(5.485, 7.365, 9.37, 12.075, 25, 38.6, 53.7, 69.3))"
## [1] "target ~  reg  + bs(age, knots = c(1.12279675431012, 2.5409522791162, 5.44832306639288, 8.47299319303066, 10.4984409460796, 12.5946141950296, 14.9642184911231, 17.5903871016807))  +  sex  + bs(hgt, knots = c(68.4, 83.6, 102.6, 121.41558494961, 137.5, 150.4, 164.8, 175.186607366331))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.7555555555556, 85.1111111111111, 103.666666666667, 121.922222222222, 136.477777777778, 150.133333333333, 163.888888888889, 177.544444444444))  + bs(wgt, knots = c(5.47666666666667, 7.39, 9.37, 12.0266666666667, 25.0333333333333, 38.5, 53.3666666666667, 69.0333333333333))"
## [1] "target ~  reg  + bs(age, knots = c(1.14168377823409, 2.52977412731006, 5.39082819986311, 8.56673511293634, 10.4832306639288, 12.7529089664613, 15.0965092402464, 17.4674880219028))  +  sex  + bs(wgt, knots = c(5.445, 7.345, 9.22, 11.81, 24.7, 38.5, 53.5, 68.8))"
## [1] "target ~  reg  + bs(age, knots = c(1.15111415316754, 2.44735572749027, 5.41442577621778, 8.56396697798399, 10.4440438303817, 12.5822496007301, 15.0745781192944, 17.543514590024))  +  sex  + bs(hgt, knots = c(68.2666666666667, 83.5029429963787, 102.4, 122.486198608143, 138.23088544501, 150.973873226392, 164.812869303536, 175.481687011783))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(66.6555555555556, 84.2333333333333, 103.733333333333, 121.644444444444, 136.777777777778, 150.333333333333, 163.688888888889, 177.244444444444))  + bs(wgt, knots = c(5.25444444444444, 7.12777777777778, 9.22666666666667, 11.6444444444444, 24.2444444444444, 38.6333333333333, 53.5222222222222, 69.5111111111111))"
## [1] "target ~  reg  + bs(age, knots = c(1.10666556979129, 2.53707506274241, 5.43737166324435, 8.67852457039585, 10.5042208532968, 12.807665982204, 15.1585671914214, 17.6308638271874))  +  sex  + bs(wgt, knots = c(5.37277777777778, 7.35222222222222, 9.30333333333333, 11.6355555555556, 24.2, 38.3666666666667, 53.2777777777778, 69.2888888888889))"
## [1] "target ~  reg  + bs(age, knots = c(1.0838847060613, 2.50756711536999, 5.48482774355464, 8.6938161610008, 10.5246390022844, 12.7711613050422, 14.9790858620427, 17.6887765544377))  +  sex  + bs(hgt, knots = c(69.3471088333187, 86.1040047697275, 103.366666666667, 123.642745047046, 139.442731083458, 152.082901610825, 164.689572411266, 175.578576489854))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.2666666666667, 85.9333333333333, 103.5, 121.166666666667, 136.3, 150.3, 163.766666666667, 177.333333333333))  + bs(wgt, knots = c(5.47333333333333, 7.53, 9.45, 12.2666666666667, 25.1666666666667, 39.3, 53.8333333333333, 69.7666666666667))"
## [1] "target ~  reg  + bs(age, knots = c(1.02760666210358, 2.50956046213609, 5.32974657885903, 8.42308511489189, 10.47399775204, 12.8071521469522, 15.1439653205567, 17.5670429099514))  +  sex  + bs(wgt, knots = c(5.54444444444444, 7.37944444444444, 9.21833333333333, 11.4155555555556, 23.2444444444444, 37.2333333333333, 52.9222222222222, 68.7111111111111))"
## [1] "target ~  reg  + bs(age, knots = c(1.15585592916564, 2.60589689279945, 5.40177960301164, 8.53104323677203, 10.4266484143281, 12.6324435318275, 14.9760438056126, 17.4159583041541))  +  sex  + bs(hgt, knots = c(69.7433478251907, 85.8111111111111, 103.466666666667, 123.822222222222, 138.891296096121, 151.233333333333, 164.688888888889, 175.344444444444))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.3222222222222, 84.8888888888889, 102.866666666667, 120.588888888889, 136.511111111111, 149.933333333333, 163.455555555556, 176.777777777778))  + bs(wgt, knots = c(5.49666666666667, 7.47333333333333, 9.4, 12.2116666666667, 25.2666666666667, 38.7, 53.6333333333333, 69.0666666666666))"
## [1] "target ~  reg  + bs(age, knots = c(0.949361565440461, 2.3937942048825, 5.29044033766826, 8.40763556163967, 10.3416923240569, 12.5868126853753, 14.9973382006236, 17.4744530762851))  +  sex  + bs(wgt, knots = c(5.39555555555556, 7.43222222222222, 9.21833333333333, 11.8022222222222, 23.6777777777778, 37.4333333333333, 52.6888888888889, 68.1444444444444))"
## [1] "target ~  reg  + bs(age, knots = c(0.98559205677126, 2.50947279179496, 5.21560574948665, 8.24813381244964, 10.2715035363906, 12.4216290212183, 14.8838694957791, 17.3782037213875))  +  sex  + bs(hgt, knots = c(68.4222222222222, 85.3174935512838, 104.174963516316, 122.948629294582, 138.411111111111, 151.191518366169, 164.055555555556, 175.677777777778))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.7444444444444, 84.5888888888889, 103.733333333333, 121.977777777778, 137.322222222222, 151.066666666667, 164.511111111111, 177.911111111111))  + bs(wgt, knots = c(5.32388888888889, 7.16833333333333, 9.09333333333333, 11.3822222222222, 23.1777777777778, 37.2333333333333, 52.4444444444445, 67.8222222222222))"
## [1] "target ~  reg  + bs(age, knots = c(1.05224731918777, 2.59031105026998, 5.39229399465131, 8.57701020027951, 10.6416776689396, 12.8113164499201, 15.1705202269894, 17.6658301011484))  +  sex  + bs(wgt, knots = c(5.41333333333333, 7.27, 9.3, 11.8033333333333, 24.0666666666667, 38.2, 53.0333333333333, 68.4333333333333))"
## [1] "target ~  reg  + bs(age, knots = c(1.15724921442264, 2.60187086470454, 5.39082819986311, 8.49828884325804, 10.5005703855807, 12.8413832775109, 15.0236487755563, 17.4558398186012))  +  sex  + bs(hgt, knots = c(69.2, 85.4, 103.2, 121.5, 137.723746981756, 150.7, 164.796376894498, 176.217125745456))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.3444444444444, 85.0444444444445, 103.333333333333, 120.688888888889, 136.222222222222, 150.033333333333, 163.655555555556, 177.177777777778))  + bs(wgt, knots = c(5.355, 7.37, 9.36, 11.99, 24.2333333333333, 38.5, 53.7666666666667, 69.5333333333333))"
## [1] "target ~  reg  + bs(age, knots = c(1.12880841827085, 2.47410449463838, 5.29226557152635, 8.47364818617385, 10.5187354788522, 12.7145790554415, 15.0545288615104, 17.6326716860598))  +  sex  + bs(wgt, knots = c(5.37222222222222, 7.36222222222222, 9.225, 11.4266666666667, 23.3111111111111, 37.5333333333333, 52.8555555555556, 68.4555555555555))"
## [1] "target ~  reg  + bs(age, knots = c(1.1777349306378, 2.67183816259792, 5.50871466753641, 8.57890333865693, 10.4783633736406, 12.643394934976, 14.9556620275306, 17.6141151418359))  +  sex  + bs(hgt, knots = c(68.6196412793339, 85.3222222222222, 104.626536356288, 122.681723923039, 138.555555555556, 151.492775816993, 164.377777777778, 175.296196812553))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.0111111111111, 84.2666666666667, 103.433333333333, 121.344444444444, 136.755555555556, 150.466666666667, 164.177777777778, 177.688888888889))  + bs(wgt, knots = c(5.51166666666667, 7.53833333333333, 9.38, 11.7883333333333, 23.7666666666667, 37.9, 52.8333333333333, 68.6666666666667))"
## [1] "target ~  reg  + bs(age, knots = c(0.975283291505057, 2.39683626131265, 5.13027358744135, 8.29716720877898, 10.3014146233384, 12.4992014601871, 14.9447106243821, 17.4285496995969))  +  sex  + bs(wgt, knots = c(5.29666666666667, 7.24166666666667, 9.3, 11.7916666666667, 23.7, 37.4, 52.7666666666667, 68.1333333333333))"
## [1] "target ~  reg  + bs(age, knots = c(1.03095292417674, 2.51973534109058, 5.34337211955282, 8.37751920298121, 10.446134006641, 12.8605977640885, 15.223272130979, 17.5341235074911))  +  sex  + bs(hgt, knots = c(68.4996405334852, 84.3614096585245, 102.2, 121.631965027566, 138.133333333333, 151.43973585129, 165.266666666667, 175.484743359629))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.2, 85, 103, 121.5, 137.1, 150.7, 164, 177.5))  + bs(wgt, knots = c(5.40333333333333, 7.35666666666667, 9.37, 11.8283333333333, 23.7, 37.4, 52.5333333333333, 67.7666666666667))"
## [1] "target ~  reg  + bs(age, knots = c(1.0338424543205, 2.48353486957183, 5.40213083853655, 8.50498136740437, 10.4233021522549, 12.5114299005637, 14.9669176363222, 17.4492419545197))  +  sex  + bs(wgt, knots = c(5.37888888888889, 7.34277777777778, 9.265, 11.7366666666667, 25.1444444444444, 39.0333333333333, 53.7222222222222, 69.3222222222222))"
## [1] "target ~  reg  + bs(age, knots = c(1.07386833728514, 2.56796025008228, 5.40086698608259, 8.52957284877405, 10.4999619742946, 12.7510837326032, 15.0733896113773, 17.6119857023348))  +  sex  + bs(hgt, knots = c(69.0444444444444, 85.1898143493707, 103.444317591753, 123.232471653094, 139.780902152527, 152.318655757119, 165.665744110938, 175.759170700196))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.4443722515093, 83.9536522494831, 102.137720416041, 122.381207860315, 138.577777777778, 150.533333333333, 164.69001199529, 174.395516809967))  + bs(wgt, knots = c(5.66611111111111, 8.30222222222222, 10.5133333333333, 15.9989404278409, 28.3037341674331, 40.3333333333333, 54.4, 67.131435616893))"
## [1] "target ~  reg  + bs(age, knots = c(0.966584429271642, 2.40748345881816, 5.38261464750171, 8.54393086249615, 10.5806770535312, 12.8806753365275, 15.1610008365655, 17.640349423661))  +  sex  + bs(wgt, knots = c(5.76833333333333, 8.26090962993354, 10.5, 16.6367083554503, 29.1333333333333, 41.2232518988415, 54.3667823554764, 67.4333333333333))"
## [1] "target ~  reg  + bs(age, knots = c(0.992623013156894, 2.51638907901742, 5.19205880954744, 8.3565290136132, 10.4360787892615, 12.6952934779219, 14.9401475397369, 17.4855663011122))  +  sex  + bs(hgt, knots = c(68.5035443740654, 84.1797373929248, 101.753360301355, 121.60025799403, 137.65628338504, 150.955593651517, 164.522222222222, 175.744204389772))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.0333333333333, 83.2753845080462, 101.8, 121.333333333333, 138.293389492008, 151.8, 166.501574417564, 176.571348376001))  + bs(wgt, knots = c(5.76388888888889, 8.16277777777778, 10.4133333333333, 15.501115503789, 27.6977840687784, 40.4428835848053, 54.9925978084919, 67.4017227442419))"
## [1] "target ~  reg  + bs(age, knots = c(0.933911324055061, 2.21853275492573, 4.95060173315741, 8.27013461099703, 10.3944026161685, 12.5703855806525, 14.9590082896038, 17.5064245542081))  +  sex  + bs(wgt, knots = c(5.7821249836567, 8.08622138049956, 10.2466666666667, 14.8888888888889, 26.9110793106661, 38.1716872962186, 52.2589491923843, 65.2777777777778))"
## [1] "target ~  reg  + bs(age, knots = c(0.978584136988153, 2.50592099186358, 5.28405201916495, 8.43341505475585, 10.5154764620884, 12.6396263532174, 15.0589296230942, 17.7054205058825))  +  sex  + bs(hgt, knots = c(68.2666666666667, 84.3808554476306, 103.046057925967, 122.037911376003, 137.269997863338, 150.836633373078, 164.426661219486, 175.733333333333))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(66.5, 82.9866471902223, 100.326928633515, 121.3, 137.970996322437, 150.5, 164.16662517475, 174.8))  + bs(wgt, knots = c(5.84226511396147, 8.31256071602552, 10.5820251478267, 16.5308314554174, 28.9091667192058, 40.2793846769725, 53.7720679041504, 67.0208350057978))"
## [1] "target ~  reg  + bs(age, knots = c(0.954597307780059, 2.39815066326536, 5.10609171800137, 8.3502392879895, 10.4649783253479, 12.7145790554415, 15.1549167237052, 17.7020157251249))  +  sex  + bs(wgt, knots = c(5.90628348332146, 8.295, 10.56, 15.908785869362, 27.6953100638196, 39.7, 53.550138227972, 66.3666666666666))"
## [1] "target ~  reg  + bs(age, knots = c(0.989326156628119, 2.42026009582478, 5.1006160164271, 8.2984257357974, 10.4229979466119, 12.5886379192334, 15.0280629705681, 17.6011046555393))  +  sex  + bs(hgt, knots = c(67.7564918411958, 83.3136062399879, 101.3, 120.466666666667, 137.933333333333, 150.644781903624, 164.496921694425, 176.108029783984))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.9876806917679, 83.9325800146908, 103.757789941332, 124.088888888889, 140.241840635754, 153.000169399045, 166.329131072113, 175.624993470423))  + bs(wgt, knots = c(5.76166666666667, 8.27298471383538, 10.58, 16.4736668007158, 28.5444998067844, 40.9095311638407, 54.9685114688093, 68.054739916252))"
## [1] "target ~  reg  + bs(age, knots = c(0.974979085862043, 2.46254468020382, 5.32968286561715, 8.6191420640668, 10.5997414252034, 12.8350999253948, 15.128755038406, 17.6533576697848))  +  sex  + bs(wgt, knots = c(5.74555555555555, 8.18101064707678, 10.3966666666667, 15.908900417942, 28.0206601045997, 40.5928494202715, 54.6202941745506, 67.4444444444444))"
## [1] "target ~  reg  + bs(age, knots = c(1.03336386148478, 2.52916571602403, 5.26957422942012, 8.22117708069138, 10.4215102723393, 12.47729865389, 14.8245493953913, 17.5500847549458))  +  sex  + bs(hgt, knots = c(69.6059888810425, 85.787841634844, 103.533333333333, 122.344444444444, 137.791233316822, 150.779722282139, 164.677777777778, 176.220540558451))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.5, 83.3924287828115, 102, 123.1, 139.2, 152.802594546335, 166.229004890898, 176.3))  + bs(wgt, knots = c(5.83388888888889, 8.30111111111111, 10.5290925477952, 16.3353792596964, 29.0973074111635, 40.7078860429484, 54.1888888888889, 66.7329309850423))"
## [1] "target ~  reg  + bs(age, knots = c(0.941412990907994, 2.29827363297589, 4.98927675108373, 8.07396033238697, 10.246679248693, 12.4417065936573, 14.9006623138093, 17.5824777549624))  +  sex  + bs(wgt, knots = c(5.87111111111111, 8.26833333333333, 10.5133333333333, 16.9491849878831, 28.4555555555556, 39.9666666666667, 53.685870743105, 66.9943739939299))"
## [1] "target ~  reg  + bs(age, knots = c(1.04527858113746, 2.64020077572439, 5.7802014403519, 8.77484776960338, 10.7694881740056, 12.8852384211727, 15.129059244049, 17.788428298238))  +  sex  + bs(hgt, knots = c(69.1777777777778, 84.6555555555556, 103.421049824033, 122.511216295719, 138.777777777778, 151.125279659875, 164.544444444444, 176.058325962122))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.0222222222222, 82.1342987288947, 100.633333333333, 119.868578202293, 137.411111111111, 150.512715266112, 164.359663259925, 174.901926189168))  + bs(wgt, knots = c(5.82833333333333, 8.31028380418545, 10.4566666666667, 15.5817493549615, 27.7797137357738, 39.1333333333333, 53.6518425256859, 66.539973590635))"
## [1] "target ~  reg  + bs(age, knots = c(0.955814130352118, 2.43303673283139, 5.03034451289071, 8.35315192262525, 10.3822343904479, 12.5211042664841, 15.0569625066545, 17.5674908738518))  +  sex  + bs(wgt, knots = c(5.88142407153377, 8.33105487233559, 10.435, 15.9354533368299, 27.2, 39.6, 54.2, 67.0989161366686))"
## [1] "target ~  reg  + bs(age, knots = c(1.00444240478131, 2.51121758308617, 5.33447035362253, 8.3856447076692, 10.4963115065784, 12.6141911932466, 14.9605293178188, 17.5654689534502))  +  sex  + bs(hgt, knots = c(69.3838691615885, 84.7555555555556, 103.733333333333, 122.011111111111, 137.988888888889, 151.660060385955, 164.923975009423, 176.322222222222))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.3666666666667, 83.1182723366694, 102.4, 123.10808982571, 139.074271572934, 152.049112826524, 165.829525548058, 175.812181892613))  + bs(wgt, knots = c(5.72444444444444, 8.21888888888889, 10.4333333333333, 15.8390303064971, 28.8170553373761, 40.6300627437126, 54.932160318174, 67.2952632219156))"
## [1] "target ~  reg  + bs(age, knots = c(0.926941790760807, 2.29857783861891, 5.19552817704768, 8.40066511347625, 10.4552437447715, 12.7100159707963, 14.9337592212336, 17.4157730625903))  +  sex  + bs(wgt, knots = c(5.85166666666667, 8.17888888888889, 10.37, 15.8282407089714, 28.1222222222222, 40.0666666666666, 53.8325122866047, 66.7555555555555))"
## [1] "target ~  reg  + bs(age, knots = c(1.06734789680156, 2.60857488415541, 5.51768195300023, 8.66822716165809, 10.7371507289514, 12.976264617719, 15.1641112558681, 17.7102837175338))  +  sex  + bs(hgt, knots = c(69.0033246951242, 85.4589068607076, 103.7, 123.034765912424, 138.533333333333, 151.338003073812, 164.789632719419, 175.500793610595))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67, 82.8, 101.238728122974, 121.863841846084, 138.609180957425, 151.8, 165.5, 176))  + bs(wgt, knots = c(5.73383872044647, 8.34888888888889, 10.5703737581506, 16.4555555555556, 28.8967617016895, 40.4601560892819, 54.518799386886, 67.6053406140951))"
## [1] "target ~  reg  + bs(age, knots = c(0.991114526970264, 2.47288767206632, 5.32499613083555, 8.43379724693893, 10.5203437523766, 12.8155278995696, 15.2191041143813, 17.6911737025597))  +  sex  + bs(wgt, knots = c(5.88777777777778, 8.30985443579897, 10.5509359954186, 15.5003355086581, 27.2950970790169, 40.6556275642706, 53.8320359775542, 66.7222222222222))"
## [1] "target ~  reg  + bs(age, knots = c(0.941761294161383, 2.48262225264279, 5.27419713252316, 8.40654746989484, 10.4537455311537, 12.6169290440338, 14.9246330519431, 17.5422715958692))  +  sex  + bs(hgt, knots = c(68.4296256181989, 84.5222222222222, 103.833333333333, 121.844444444444, 138.247176793081, 150.623577634318, 163.781391730657, 175.493252711393))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.3111111111111, 83.9116474312696, 102.933333333333, 121.697836216056, 138.258614994925, 151.371022179192, 164.536871187615, 175.539477099627))  + bs(wgt, knots = c(5.72, 8.18737661249725, 10.44, 16.4202265270967, 28.9, 40.982428546101, 55.1, 68.2877496170393))"
## [1] "target ~  reg  + bs(age, knots = c(0.958708905928502, 2.46802038177808, 5.29054682006734, 8.50711080690547, 10.569320860902, 12.7757243896874, 15.129971860978, 17.7777777777778))  +  sex  + bs(wgt, knots = c(5.855, 8.24666666666667, 10.5, 16.3985570248469, 28.4333333333334, 40.6, 54.5986793168661, 67.5333333333333))"
## [1] "target ~  reg  + bs(age, knots = c(1.00479123887748, 2.55167693360712, 5.73305954825462, 8.6652977412731, 10.6009582477755, 12.9314453604447, 15.1348391512663, 17.7082823487287))  +  sex  + bs(hgt, knots = c(67.876489782629, 84.8098175961742, 103.523542892432, 123.777777777778, 138.89555997974, 151.011666339268, 164.402909689445, 175.789958484862))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.3028451766798, 83.6444444444444, 101.733333333333, 121.442056477836, 138.511111111111, 150.892343118119, 164.855555555556, 174.921717052252))  + bs(wgt, knots = c(5.77, 8.25, 10.6166722190651, 16.9, 29.0281451761979, 41.3, 55.1, 68))"
## [1] "target ~  reg  + bs(age, knots = c(0.953691748643498, 2.48475169214389, 5.43760188945374, 8.69054680964332, 10.6170811468553, 12.8815879534565, 15.0551372727964, 17.6296296296296))  +  sex  + bs(wgt, knots = c(5.84833333333333, 8.19166666666667, 10.4299530075849, 15.2888888888889, 27.214043659133, 39.7061183110158, 53.0750197447074, 66.4777777777778))"
## [1] "target ~  reg  + bs(age, knots = c(1.0321697467488, 2.52977412731006, 5.37987679671458, 8.40246406570842, 10.4312114989733, 12.6669947185588, 15.0937713894593, 17.6563997262149))  +  sex  + bs(hgt, knots = c(68.7542478410261, 84.6, 102.3, 121.9, 138.4, 150.9, 164.6, 176.123636927666))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.9119375845444, 85.0888888888889, 104.252139049574, 124.826918510916, 139.922222222222, 151.866666666667, 165.311111111111, 175.879532822613))  + bs(wgt, knots = c(5.91722222222222, 8.40444444444444, 10.6659578256971, 17.0777777777778, 28.8, 41.2666666666667, 54.8111111111111, 67.5606225938387))"
## [1] "target ~  reg  + bs(age, knots = c(0.954214524131122, 2.43455776104647, 5.3751841278905, 8.56612670165032, 10.4999619742946, 12.6671229751312, 14.9693512814663, 17.4279237797719))  +  sex  + bs(wgt, knots = c(5.86111111111111, 8.22051100390602, 10.3233333333333, 15.4460413349085, 27.2777777777778, 39.8333333333333, 53.2888888888889, 66.6235178607878))"
## [1] "target ~  reg  + bs(age, knots = c(1.01203257390754, 2.53688582598137, 5.50581793292266, 8.54243999112754, 10.517059354688, 12.8379497532809, 15.2364804558387, 17.681028238698))  +  sex  + bs(hgt, knots = c(69.1029455052102, 84.5564583287878, 103.4, 122.230298595786, 137.566666666667, 150.772631814566, 164.443283880145, 175.569693321563))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.4888888888889, 83.8777777777778, 103.566666666667, 122.596053323827, 138.244444444444, 151.433333333333, 165.160876834226, 176.022222222222))  + bs(wgt, knots = c(5.82407349056642, 8.32111111111111, 10.5887264194785, 16.8222222222222, 29.0777777777778, 41.4030288319688, 54.8989692313768, 67.0691710905677))"
## [1] "target ~  reg  + bs(age, knots = c(0.976195908434101, 2.48701326111601, 5.20804214309706, 8.37082667883489, 10.4483049698736, 12.5856583147104, 14.9781732451137, 17.5877851509518))  +  sex  + bs(wgt, knots = c(5.86953082446562, 8.27, 10.4756561444523, 15.8636607985044, 27.0751200974968, 38.8450642189313, 53, 66.1609567237467))"
## [1] "target ~  reg  + bs(age, knots = c(1.04221726821942, 2.52922481642651, 5.44558521560575, 8.50500364930461, 10.5206479580196, 12.7364818617385, 15.0079853981291, 17.5587497148072))  +  sex  + bs(hgt, knots = c(68.0555555555555, 83.1111111111111, 101.933333333333, 121.400907740897, 137.061882117657, 151.233333333333, 165.048725779047, 175.544444444444))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.88071570214, 83.9777777777778, 102.166666666667, 122.155555555556, 138.0308782712, 151.733333333333, 165.334189465844, 176.109536537716))  + bs(wgt, knots = c(5.80833333333333, 8.33444444444444, 10.7597468879635, 16.1888888888889, 28.5854600217984, 40.6536405489746, 54.3555555555556, 66.9547183048538))"
## [1] "target ~  reg  + bs(age, knots = c(0.960985626283368, 2.52703627652293, 5.36665563501911, 8.43805612594114, 10.5171080714178, 12.8471826829307, 15.1841204654346, 17.6892539356605))  +  sex  + bs(wgt, knots = c(5.97551535294085, 8.22666666666667, 10.4066666666667, 15.7676432941265, 27.2111111111111, 40.1965692075473, 54.6555555555556, 67.1092733070495))"
## [1] "target ~  reg  + bs(age, knots = c(0.9865389002966, 2.54100484424834, 5.50628265072032, 8.56643090729333, 10.4968365827316, 12.6662103582021, 15.005551752985, 17.4375005584222))  +  sex  + bs(hgt, knots = c(67.6222222222222, 83.4659619682981, 101.5879268895, 121.388652713577, 137.369994526594, 150.785830161495, 164.603791531806, 176.161617293536))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.8666666666667, 82.9333333333333, 101.8, 121.566666666667, 138.65173806334, 151.1, 165.55964684896, 175.82225487568))  + bs(wgt, knots = c(5.75222222222222, 8.20888888888889, 10.3133333333333, 16.20260943348, 28.5117411514678, 39.9409003527099, 54.8, 67.2739629123028))"
## [1] "target ~  reg  + bs(age, knots = c(0.919911405714613, 2.27332877024869, 4.93086926762491, 8.36078789261541, 10.4759297284965, 12.6344699774398, 14.901513423074, 17.430983344741))  +  sex  + bs(wgt, knots = c(5.84440191195707, 8.285, 10.52, 15.6605742165885, 27.5, 40.2, 53.7, 66.578543508463))"
## [1] "target ~  reg  + bs(age, knots = c(1.02409568948307, 2.48444748650087, 5.14796529186733, 8.44545893558152, 10.6204466355128, 12.8742870180242, 15.0624382082288, 17.6311506578447))  +  sex  + bs(hgt, knots = c(69.1113198785576, 83.9777777777778, 101.066666666667, 121.19431059197, 138.218805240172, 151.690289570766, 165.022222222222, 176.497889595508))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.7666666666667, 82.9129713675799, 102.2, 122.933333333333, 138.933333333333, 152.2, 165.466666666667, 176.215060519801))  + bs(wgt, knots = c(5.73945023987413, 8.20052451123998, 10.48, 16.0697715389918, 28.5564637996497, 41.3, 54.988097338672, 67.0333333333333))"
## [1] "target ~  reg  + bs(age, knots = c(0.938474408700281, 2.29462316525972, 4.98106319872234, 8.48850688889243, 10.5644535706137, 12.6789869952088, 15.1235835424747, 17.7801662203287))  +  sex  + bs(wgt, knots = c(5.79555555555556, 8.18712834870208, 10.4287128924054, 15.6154106693216, 27.5777777777778, 39.8012862830252, 53.991105298278, 66.6180076305619))"
## [1] "target ~  reg  + bs(age, knots = c(1.02334778310138, 2.57615573191928, 5.5067305498517, 8.51492755514997, 10.5918320784851, 12.7602099018937, 15.110505350797, 17.7054430839692))  +  sex  + bs(hgt, knots = c(69.3666666666667, 85.5259347627244, 104.5, 123.568893902783, 138.933333333333, 152.056104436322, 165.391155092009, 176.573033782895))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(66.6178294890125, 81.9222101223932, 99.8870205282803, 121.541628170072, 138.422222222222, 151.066666666667, 165.062886479771, 176.355555555556))  + bs(wgt, knots = c(5.69424645232045, 8.26222222222222, 10.5533333333333, 16.0128232845267, 28.3927328014099, 40.3882561080751, 54.2618210480839, 66.7888888888889))"
## [1] "target ~  reg  + bs(age, knots = c(0.941281044458048, 2.31670566553017, 5.17636322153776, 8.35896265875732, 10.4792759905696, 12.7790108567635, 15.1372727964104, 17.6521408472127))  +  sex  + bs(wgt, knots = c(5.70781043369665, 8.21888888888889, 10.5049326698453, 15.6321612656686, 27.2222222222222, 39.6874738804078, 54.1413554984856, 66.9555555555555))"
## [1] "target ~  reg  + bs(age, knots = c(0.94724586410742, 2.46041524070271, 5.24047442203108, 8.30116358658453, 10.4823180469998, 12.6488706365503, 15.0289755874971, 17.5106467643489))  +  sex  + bs(hgt, knots = c(68.5777777777778, 84.6551217825495, 101.706904481916, 121.811111111111, 137.688888888889, 151.266666666667, 165.195041779345, 175.930622243776))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.7799883293752, 83.2305047651422, 101.171998525452, 121.19125697962, 138.237902664015, 150.566637017547, 165.130825346466, 176.100945655746))  + bs(wgt, knots = c(5.75067740591183, 8.40444444444444, 10.7316666666667, 16.9, 28.8, 40.9666666666667, 55.4060785048154, 67.3555555555555))"
## [1] "target ~  reg  + bs(age, knots = c(0.977108525363145, 2.46893299870713, 5.22016883413187, 8.44809491216062, 10.5185185185185, 12.7510837326032, 15.0011855615464, 17.6317059297703))  +  sex  + bs(wgt, knots = c(5.61488900766213, 8.22292553378045, 10.4733333333333, 15.7274596146712, 27.8111111111111, 39.9433075898202, 54.2555555555556, 66.510583080073))"
## [1] "target ~  reg  + bs(age, knots = c(1.01422161381094, 2.48169983606863, 5.22750037797251, 8.35014069510989, 10.5109133774432, 12.6730102096314, 15.0557456840824, 17.5225492432885))  +  sex  + bs(hgt, knots = c(68.9009326610001, 84.6198331791914, 102.797962202319, 121.837174528487, 138.093050100802, 151.047248109846, 164.726841584359, 175.368433216053))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(66.6777777777778, 82.7972820398791, 100.552094139727, 120.711111111111, 137.617871806464, 151.076600750822, 164.744444444444, 176.018664431996))  + bs(wgt, knots = c(5.74636406697786, 8.25, 10.6219342026746, 15.8686691450437, 27.7, 40.7, 54.6278727844749, 67.2))"
## [1] "target ~  reg  + bs(age, knots = c(0.933094588888471, 2.37797551144574, 5.3077800593201, 8.56460567343524, 10.5964632033528, 12.8989276751084, 15.1181078409004, 17.6108295272419))  +  sex  + bs(wgt, knots = c(5.78160055580371, 8.26055555555556, 10.4763841081566, 15.7962036412661, 28.4867946756825, 41.3, 54.8658117058226, 67.1636604930295))"
## [1] "target ~  reg  + bs(age, knots = c(1.04068300913997, 2.51547646208837, 5.42276979237965, 8.55303274142805, 10.5261236595939, 12.6878681187262, 15.0379587324137, 17.5690927066697))  +  sex  + bs(hgt, knots = c(69.1155678268719, 83.1958307559635, 101.351103303685, 120.477777777778, 136.93729164877, 150.413034130025, 164.155555555556, 175.304216988609))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.7666666666667, 83.1333333333333, 101.54227570984, 122.969000658274, 138.935931410069, 151.5, 165.198100670855, 176.523586272671))  + bs(wgt, knots = c(5.76444444444444, 8.24444444444444, 10.5833048541446, 16.8021622116074, 28.9, 40.9049764024089, 54.9002378936574, 67.3247206356933))"
## [1] "target ~  reg  + bs(age, knots = c(0.958539718426984, 2.25933531067001, 5.02851927903263, 8.10920982584227, 10.417838804279, 12.5397835020345, 14.9392349228078, 17.4058523743532))  +  sex  + bs(wgt, knots = c(5.72993718178346, 8.07694940753532, 10.32, 14.7870646315353, 26.4710323412943, 39.0257223673018, 53.2099586156745, 65.7807526923626))"
## [1] "target ~  reg  + bs(age, knots = c(1.07412540441615, 2.51582762826357, 5.29682865617157, 8.36291733211651, 10.4160012168226, 12.6534337211955, 14.9576042010475, 17.6141151418359))  +  sex  + bs(hgt, knots = c(68.1934179766176, 83.8111111111111, 101.09044815406, 121.244444444444, 137.077777777778, 150.415890204734, 164.288888888889, 175.896559835795))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.2963448755932, 82.7568781074146, 102.025105722501, 123.555555555556, 138.83012304284, 151.262212386688, 164.322222222222, 175.209294681675))  + bs(wgt, knots = c(5.73502353561081, 8.32222222222222, 10.48, 15.4444444444444, 28.0181432093586, 40.1666666666667, 53.9854020944135, 66.7142265168148))"
## [1] "target ~  reg  + bs(age, knots = c(0.938654915070469, 2.39318579359647, 5.22818686457421, 8.36170050954445, 10.4555479504145, 12.7027150353639, 15.086849744302, 17.6691944342516))  +  sex  + bs(wgt, knots = c(5.60986038514366, 8.13536928286432, 10.305, 15.3842208739941, 27.2557365707835, 39.4511371014964, 53.7666666666667, 66.0333333333333))"
## [1] "target ~  reg  + bs(age, knots = c(0.952716825061448, 2.54224655867366, 5.40360483686972, 8.56206973944563, 10.5458970263898, 12.5849874515172, 14.9398433340938, 17.5847150225194))  +  sex  + bs(hgt, knots = c(69.0850057289027, 85.1111111111111, 101.949800481813, 122.522222222222, 138.09475425286, 150.792368136284, 164.397141655195, 175.326015881332))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(66.9909646569257, 83.2345327316173, 102.266666666667, 121.867784799756, 138.188888888889, 150.938732014417, 164.644444444444, 176.118205544307))  + bs(wgt, knots = c(5.62363167441362, 8.19888888888889, 10.4886468200053, 16.2886065342534, 28.321084234521, 40.4957836093306, 54.4, 67.2555555555555))"
## [1] "target ~  reg  + bs(age, knots = c(0.958247775496235, 2.44216290212183, 5.22655715263518, 8.55304585900068, 10.5927446954141, 12.9443060810873, 15.0800821355236, 17.6317590691307))  +  sex  + bs(wgt, knots = c(5.77555555555556, 8.34237188235423, 10.5266666666667, 16.7571787789324, 28.8, 40.092768071824, 54.3850134736425, 66.4048322945638))"
## [1] "target ~  reg  + bs(age, knots = c(0.9865389002966, 2.46957401937794, 5.42094455852156, 8.40885238421173, 10.3919689710244, 12.6105407255305, 15.0563540953685, 17.6518366415697))  +  sex  + bs(hgt, knots = c(67.7937135646955, 83.1695369560822, 101.643606118827, 121.414727278646, 137.303183459606, 150.233333333333, 164.611408944038, 175.861153855984))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.5777777777778, 84.0609336567739, 103.433333333333, 124.611111111111, 140.188888888889, 152.824625010893, 166.389451512459, 176.822222222222))  + bs(wgt, knots = c(5.76333333333333, 8.29, 10.5717894826094, 15.7995261586141, 28.1333333333333, 40.7, 54.5913108435358, 67.4832593379704))"
## [1] "target ~  reg  + bs(age, knots = c(0.954623169388725, 2.39440261616853, 5.34194298075598, 8.49140109571415, 10.5802722640505, 12.8177983654951, 15.0602037401184, 17.6876248808742))  +  sex  + bs(wgt, knots = c(5.7334406923197, 8.09777777777778, 10.3933333333333, 15.2453104727114, 27.2044424132249, 39.6155783297714, 52.7222222222222, 66.2111111111111))"
## [1] "target ~  reg  + bs(age, knots = c(0.988668339797703, 2.34390447942809, 4.97102441250285, 8.11000509163619, 10.3405929892924, 12.4280173397217, 14.9346718381626, 17.5626941113266))  +  sex  + bs(hgt, knots = c(68.5346184339016, 84.2444444444444, 101.882760576831, 121.188888888889, 136.611111111111, 150.333333333333, 163.964568739499, 175.077777777778))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.3157324891368, 83.1514120020926, 100.918960772231, 121.447412134685, 138.044444444444, 150.647980482222, 164.922222222222, 176.309475844444))  + bs(wgt, knots = c(5.77222222222222, 8.26444444444444, 10.5624892841307, 16.5777777777778, 29.3101463739591, 41.5992671278462, 55.3, 67.7463739365905))"
## [1] "target ~  reg  + bs(age, knots = c(0.965823908164292, 2.4476386036961, 5.33333333333333, 8.56673511293634, 10.5790554414784, 12.8268309377139, 15.1400953524266, 17.5898795629295))  +  sex  + bs(wgt, knots = c(5.72705227453644, 8.16888888888889, 10.4827559226216, 16.0896610026709, 27.9074983337744, 40.4666666666667, 54.7723767028829, 66.2774198606295))"
## [1] "target ~  reg  + bs(age, knots = c(1.00285665936952, 2.53298783083387, 5.4757015742642, 8.5658224960073, 10.5991330139174, 12.7611225188227, 15.1394022359115, 17.5901501443943))  +  sex  + bs(hgt, knots = c(68.4444444444444, 83.7801401566647, 101.643759834835, 121.512711060502, 138.07300865075, 150.504903635048, 164.545744252805, 176.455555555556))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.1501510954288, 83.9444444444444, 103.966666666667, 123.601604190726, 139.608080568054, 151.133162577501, 164.744903225883, 176.935567988812))  + bs(wgt, knots = c(5.80777777777778, 8.17277777777778, 10.4333333333333, 16.1040129801793, 28.0888888888889, 39.955417391096, 54.1605535587985, 67.3878383061211))"
## [1] "target ~  reg  + bs(age, knots = c(0.965852916571602, 2.43577458361853, 5.41364362308921, 8.50437295611833, 10.5185185185185, 12.7200547570157, 15.0618297969427, 17.6342655650197))  +  sex  + bs(wgt, knots = c(5.89222222222222, 8.26722222222222, 10.54, 16.2, 28.8001537904011, 40.1747807533019, 54.2830855082759, 67.0289996680192))"
## [1] "target ~  reg  + bs(age, knots = c(1.12542276659983, 2.58422693740969, 5.51222200933238, 8.79063046619515, 10.6259031105027, 12.9098790782569, 15.150049433417, 17.6497072020686))  +  sex  + bs(hgt, knots = c(68.1000341279545, 83.7074662796098, 101.483295269381, 120.444444444444, 137.266259525311, 150.110130673936, 163.807282855039, 175.311319603724))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.0333333333333, 82.7666666666667, 102.3, 121.422885126977, 138.159144376923, 151.5, 165.831848697174, 176.11180619504))  + bs(wgt, knots = c(5.70111111111111, 8.19166666666667, 10.4934344413661, 17.27523973641, 30.52412702673, 42.2, 55.5571725548024, 67.5270501050673))"
## [1] "target ~  reg  + bs(age, knots = c(0.94486272720359, 2.33325024744902, 4.94998485141806, 8.32365374548108, 10.4968355818576, 12.7836829717816, 15.0575709179405, 17.6710676719954))  +  sex  + bs(wgt, knots = c(5.77777777777778, 8.27111111111111, 10.4333333333333, 15.9150302713083, 27.9777777777778, 40.7445440680472, 54.0976736074742, 67.5444444444444))"
## [1] "target ~  reg  + bs(age, knots = c(0.979504875525243, 2.57901147894478, 5.1777108070796, 8.331584150886, 10.4289724120506, 12.5461616519407, 14.9517073541714, 17.5812398809911))  +  sex  + bs(hgt, knots = c(67.5333333333333, 83.6565697163504, 102, 121.364169493296, 138.286750715951, 151.1, 164.769091024371, 175.405508401853))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.9709500209113, 83.2026218385493, 101.6, 122, 138.098985999553, 150.4, 164.8, 175.88327900658))  + bs(wgt, knots = c(5.755, 8.05912734490016, 10.305, 15.3, 27.6, 40.3, 54.1, 66.4))"
## [1] "target ~  reg  + bs(age, knots = c(0.93969123127234, 2.42969047075823, 5.28222678530687, 8.40489771085254, 10.4570689786296, 12.7392197125257, 15.087687276599, 17.6634109860042))  +  sex  + bs(wgt, knots = c(5.89170112290158, 8.12902736724471, 10.3733333333333, 15.7965177741615, 27.7111111111111, 39.8253595737956, 53.8555555555556, 66.9990672274038))"
## [1] "target ~  reg  + bs(age, knots = c(1.05650886258246, 2.49935356300859, 5.25484827743554, 8.35822042627979, 10.4153928055365, 12.669224044094, 15.0733896113773, 17.6263385127531))  +  sex  + bs(hgt, knots = c(68.1111111111111, 82.4478714679445, 100.55498163268, 120.387920570096, 137.35952160985, 151.030882624122, 164.825126644237, 175.333038370648))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.0111111111111, 82.514754835109, 100.994576754451, 121.474650743003, 137.515373852191, 150.83690685045, 164.777777777778, 175.201548933624))  + bs(wgt, knots = c(5.78959681016779, 8.26888888888889, 10.437179244847, 16.4784729027986, 28.7056754951987, 40.7333333333333, 55.3502899832718, 67.7432370205897))"
## [1] "target ~  reg  + bs(age, knots = c(0.931057933325575, 2.37797583583987, 5.19552817704768, 8.36078789261541, 10.4369958535223, 12.6497832534794, 14.972026739008, 17.5648338276675))  +  sex  + bs(wgt, knots = c(5.765, 8.16859486272206, 10.555, 16.8, 29, 41.3, 55.4, 67.6))"
## [1] "target ~  reg  + bs(age, knots = c(1.04220853296829, 2.54437599817477, 5.22929500342231, 8.56034679443304, 10.549851699749, 12.8748212908001, 15.1394022359115, 17.6668796316717))  +  sex  + bs(hgt, knots = c(68.2282999743312, 83.9070936945294, 101.033333333333, 121.244444444444, 137.255555555556, 150.866666666667, 164.610885649217, 175.267889524175))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.2520645015241, 83.0837284901204, 102.4, 122.433333333333, 138.533333333333, 151.2, 164.916520861667, 176.005799482629))  + bs(wgt, knots = c(5.77333333333333, 8.34458443870781, 10.5, 16.4387127383224, 28.8, 40.6504133568505, 54.6532873565593, 67.4752934115584))"
## [1] "target ~  reg  + bs(age, knots = c(0.983029585229936, 2.47505945822339, 5.17088751996349, 8.36535097726063, 10.6434510884412, 12.945156703638, 15.2944932744776, 17.7093315080995))  +  sex  + bs(wgt, knots = c(5.69444444444444, 8.11888888888889, 10.3828676493705, 15.4879812136934, 27.2645441948205, 40.3081385813005, 54.4, 67.1555555555555))"
## [1] "target ~  reg  + bs(age, knots = c(1.0325975260555, 2.50013121569996, 5.17180013689254, 8.36810920006217, 10.5096965548711, 12.7912388774812, 15.0974218571755, 17.6340044200997))  +  sex  + bs(hgt, knots = c(69.1, 84.2, 101.8, 121.712551857614, 139.1, 151.4, 165.2, 176.6))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.802940411486, 83.160145567699, 102.533333333333, 122.544444444444, 139.63653253362, 151.891133232014, 165.328722487837, 176.296812659062))  + bs(wgt, knots = c(5.68888888888889, 8.15777777777778, 10.4317760104836, 15.4999842279096, 28.2825730493661, 40.9715393779526, 54.307780857328, 66.7111111111111))"
## [1] "target ~  reg  + bs(age, knots = c(0.9341780757053, 2.30981241258661, 5.06867442391056, 8.27013461099703, 10.3536390600046, 12.6163181183101, 15.0098106319872, 17.5150348845665))  +  sex  + bs(wgt, knots = c(5.75555555555555, 8.28055555555556, 10.3966666666667, 15.7435275664683, 28.0916357406779, 39.6885388942637, 53.7270504751424, 66.0444444444444))"
## [1] "target ~  reg  + bs(age, knots = c(1.0374571421703, 2.52679768862871, 5.49486652977412, 8.53327249220473, 10.5989536353167, 12.8925393566051, 15.2173612442216, 17.6871244961594))  +  sex  + bs(hgt, knots = c(69.4421907720244, 83.4992537952188, 101.267836260675, 121.716607340134, 137.907442172454, 151.919436987329, 166.134985963792, 176.4860644012))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.447469245731, 82.5888888888889, 100.633333333333, 121.795419445475, 137.715936518812, 150.882649069786, 164.909959703947, 176.511972490501))  + bs(wgt, knots = c(5.74777777777778, 8.18555555555556, 10.3866666666667, 15.7851863907786, 28.4777777777778, 40.8805982304608, 54.7997135865925, 67.3419565792577))"
## [1] "target ~  reg  + bs(age, knots = c(0.960985626283368, 2.38737043728545, 5.21286789869952, 8.54483230663929, 10.5790554414784, 12.8131416837782, 15.0516800940885, 17.5879534565366))  +  sex  + bs(wgt, knots = c(5.87055360924227, 8.44777777777778, 10.8066666666667, 16.7555555555556, 29.0761370397637, 41.1995692355605, 54.8, 66.8111111111111))"
## [1] "target ~  reg  + bs(age, knots = c(1.05879418295957, 2.59348816339932, 5.46748802190281, 8.60465683185387, 10.5845311430527, 12.7967145790554, 15.1658681268538, 17.699343968589))  +  sex  + bs(hgt, knots = c(68.6144818830386, 84.184388430072, 102.133333333333, 121.411816686067, 138.195095310029, 150.77978116008, 164.944444444444, 175.822222222222))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.3104006502526, 83.7020345278015, 104.133333333333, 125.177777777778, 140.305767914539, 152.266666666667, 165.811111111111, 176.409932640234))  + bs(wgt, knots = c(5.84569081634556, 8.34111111111111, 10.5903089549823, 17.0444444444444, 28.7241216147293, 40.407942851125, 54.4010047578976, 66.9083761942286))"
## [1] "target ~  reg  + bs(age, knots = c(0.985626283367556, 2.45859000684463, 5.39082819986311, 8.41133782356943, 10.4973733886116, 12.8104038329911, 15.1203626588739, 17.5906913073238))  +  sex  + bs(wgt, knots = c(5.84892270408639, 8.23418970119715, 10.4111384518782, 15.6911409515726, 27.5888888888889, 39.9939125958564, 53.8444444444445, 66.4222222222222))"
## [1] "target ~  reg  + bs(age, knots = c(1.00215713870943, 2.54072553045859, 5.43463381245722, 8.49007529089665, 10.5571526351814, 12.8104038329911, 15.0444900752909, 17.6673511293634))  +  sex  + bs(hgt, knots = c(67.9222222222222, 82.5947729849136, 100.187685931333, 119.99364625847, 137.411111111111, 151.033333333333, 164.155555555556, 175.509298537541))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.5555555555555, 83.1395384766685, 102.466666666667, 123.559225836899, 139.377777777778, 151.615515462313, 164.836816351528, 175.544444444444))  + bs(wgt, knots = c(5.68413675423248, 8.24922523877823, 10.805, 16.9333333333333, 29.0465589446121, 40.9499209206971, 54.8, 67.0231026173786))"
## [1] "target ~  reg  + bs(age, knots = c(0.95855198113925, 2.40143153030881, 5.07232489162674, 8.30907293330291, 10.4780591679976, 12.6242299794661, 15.0393185793596, 17.69929272188))  +  sex  + bs(wgt, knots = c(5.74444444444444, 8.21444444444444, 10.55, 15.8045315051221, 27.8, 40.2051270267666, 54.2228874457505, 66.9479206927329))"
## [1] "target ~  reg  + bs(age, knots = c(1.00752908966461, 2.55441478439425, 5.21013004791239, 8.3750855578371, 10.4558521560575, 12.6680355920602, 15.0116358658453, 17.5660506502396))  +  sex  + bs(hgt, knots = c(67.9555555555555, 83.8928718920676, 101.694704290568, 120.766666666667, 137.995021445708, 151.200952744021, 164.910940971529, 175.744444444444))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.6555555555556, 83.3609157744208, 102.466666666667, 121.503631731572, 137.302794158874, 150.48128063695, 164.450839667268, 175.455477363962))  + bs(wgt, knots = c(5.71062732778665, 8.08222222222222, 10.2571857197442, 15.4262511115378, 28.1995602986368, 40.4945790961043, 54.2777777777778, 66.6567973142996))"
## [1] "target ~  reg  + bs(age, knots = c(0.976195908434101, 2.46193626891779, 5.19370294318959, 8.35713742489923, 10.5005703855807, 12.8825005703856, 15.2136943960507, 17.8390178418018))  +  sex  + bs(wgt, knots = c(5.91611833121943, 8.41044414849799, 10.7183333333333, 16.8175234493455, 28.707338978387, 40.900901441961, 54.5298746326613, 67.6922172966087))"
## [1] "target ~  reg  + bs(age, knots = c(0.967069739143661, 2.42904944528758, 5.22473191877709, 8.44414023880143, 10.4792759905696, 12.6306182979694, 15.046619514792, 17.7086108618327))  +  sex  + bs(hgt, knots = c(67.7555555555556, 84.5071328188688, 101.166666666667, 120.801769218602, 137.889188770913, 150.833333333333, 164.457064053892, 175.66288714198))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.0666666666667, 83.3666666666667, 102.5, 122.933333333333, 138.353339971121, 151.009017542768, 165.304932680104, 176.333333333333))  + bs(wgt, knots = c(5.76722222222222, 8.30944444444444, 10.769781425257, 16.6974494595815, 28.7222222222222, 41.3946476520325, 55.1013916769241, 67.586352457685))"
## [1] "target ~  reg  + bs(age, knots = c(0.966765533500646, 2.39320594781979, 5.19005247547342, 8.45081998533483, 10.4358723891725, 12.838909410348, 15.1588713970644, 17.6344072739748))  +  sex  + bs(wgt, knots = c(5.84888888888889, 8.13837172897021, 10.4260531251384, 15.6011722874415, 27.5888888888889, 39.3666666666666, 54.3248454648873, 66.638200031697))"
## [1] "target ~  reg  + bs(age, knots = c(1.00527938923423, 2.47592972849646, 5.24572210814511, 8.47098871760886, 10.4841432808579, 12.6954140999316, 15.006160164271, 17.5342522952283))  +  sex  + bs(hgt, knots = c(68.5162100330258, 84.6011798838553, 102.481407331241, 122.288888888889, 138.904527093393, 150.973784420189, 165.355555555556, 176.242668524065))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.473070259162, 82.471134816776, 100.9, 121.366666666667, 137.833333333333, 151.4, 165.198543526225, 176.265145034281))  + bs(wgt, knots = c(5.72074832392798, 8.16611111111111, 10.465, 15.9571032410509, 27.8510154217234, 40.1666666666667, 54.1965665127462, 66.8212305983674))"
## [1] "target ~  reg  + bs(age, knots = c(0.934519735341091, 2.28975587497148, 5.08145106091718, 8.08852384211727, 10.4312114989733, 12.5530458590007, 14.9267624914442, 17.6319097924908))  +  sex  + bs(wgt, knots = c(5.76333333333333, 8.12285179746338, 10.3078496191404, 15.2928237945215, 26.8832029194184, 39.6592765707289, 53.0964912609684, 65.8682877191269))"
## [1] "target ~  reg  + bs(age, knots = c(0.968512084095462, 2.44337972469389, 5.40451745379877, 8.42041219864628, 10.5354787650994, 12.7948893451974, 15.1780363525743, 17.7129819758156))  +  sex  + bs(hgt, knots = c(69.0111111111111, 83.8222222222222, 102.533333333333, 122.244444444444, 138.282622584475, 151.125574846406, 164.488068449762, 174.990534930785))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(66.5333333333333, 82.1247998109888, 101.85218848057, 122.233333333333, 138.685095486558, 151.6, 164.910006355836, 175.942683367025))  + bs(wgt, knots = c(5.68555555555556, 8.18055555555556, 10.4783333333333, 15.9765913629039, 28.2777777777778, 40.6959850208467, 54.7888888888889, 67.3411323439743))"
## [1] "target ~  reg  + bs(age, knots = c(0.955509602750054, 2.41417598296448, 5.2931781884554, 8.46300098866834, 10.5017872081527, 12.8040155144878, 15.0755190508784, 17.6510002578921))  +  sex  + bs(wgt, knots = c(5.86, 8.40327729308074, 10.575, 16.4, 28.3, 40, 53.4847293317198, 66.9644605148336))"
## [1] "target ~  reg  + bs(age, knots = c(1.14712616228216, 2.57449235683322, 5.47296372347707, 8.5448646185859, 10.6210358202145, 12.9582477754962, 15.2516541181839, 17.7252164743484))  +  sex  + bs(hgt, knots = c(67.9644048954386, 83.3167950223334, 102.842097520286, 121.933333333333, 138.133333333333, 152, 165.806244994785, 176.115447006976))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(68.0666666666667, 84.0666666666667, 102.942608779809, 124.133333333333, 139.066666666667, 151.710080793595, 165.801941133226, 176.073111160995))  + bs(wgt, knots = c(5.70944444444444, 8.25444444444444, 10.5831197566592, 16.1861273538793, 28.6242261015927, 40.5333333333333, 54.6530313077358, 66.6111111111111))"
## [1] "target ~  reg  + bs(age, knots = c(0.958305583587689, 2.35187844045426, 5.13137581276353, 8.20628429579311, 10.4683245874211, 12.8615103810176, 15.1588713970644, 17.6668424998545))  +  sex  + bs(wgt, knots = c(5.89529772039849, 8.15166666666667, 10.4810634448457, 16.127237402666, 27.9838107252392, 40.1333333333333, 54.6631169407035, 66.7291299973731))"
## [1] "target ~  reg  + bs(age, knots = c(1.03589441427933, 2.60004563084645, 5.47022587268994, 8.60141455624002, 10.5525895505362, 12.6853955305547, 14.9958964669295, 17.5587497148072))  +  sex  + bs(hgt, knots = c(68.5318858686775, 84.9222222222222, 103.390481913112, 122.044444444444, 137.855555555556, 150.706777627908, 164.877777777778, 176.1600259441))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.9555555555555, 83.6111111111111, 102.066666666667, 121.900753296154, 137.397003812521, 150.533333333333, 165.178118830342, 176.144444444444))  + bs(wgt, knots = c(5.74, 8.26, 10.49, 16.2, 28.6, 40.5514944849922, 53.7981879527136, 66.9754572768474))"
## [1] "target ~  reg  + bs(age, knots = c(0.941516465130428, 2.36641569701118, 5.28587725302304, 8.63292579393261, 10.6931325576089, 12.9472963723477, 15.1421400866986, 17.5478048468429))  +  sex  + bs(wgt, knots = c(5.74222222222222, 8.04888888888889, 10.2388611208664, 14.8892205800793, 26.9662665949049, 39.3810392728243, 53.6023941532414, 66.6779351200217))"
## [1] "target ~  reg  + bs(age, knots = c(0.967373944786676, 2.43181991025934, 5.38083496038812, 8.5101418495191, 10.5340330063123, 12.8519169747094, 15.005551752985, 17.68807071316))  +  sex  + bs(hgt, knots = c(68.3015680880583, 83.75124099353, 101.733333333333, 121.986804214717, 138.104464684237, 152.122431413596, 165.255555555556, 175.767091986269))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.0777777777778, 82.2169868753259, 100.603432802104, 121.311111111111, 139.088888888889, 151.566666666667, 165.844444444444, 176.451225404199))  + bs(wgt, knots = c(5.68444444444444, 8.25417713309041, 10.4833333333333, 16.4431035108714, 28.8222222222222, 41.0806360434113, 55.0111111111111, 68.085994603512))"
## [1] "target ~  reg  + bs(age, knots = c(0.936649174842193, 2.36611149136816, 5.19735341090577, 8.38725378355768, 10.4866324507874, 12.7136664385124, 14.9699596927523, 17.5900828960377))  +  sex  + bs(wgt, knots = c(5.81, 8.165913693583, 10.44, 15.7458599241013, 28.1, 40.4, 53.7225556070438, 66.7))"
## [1] "target ~  reg  + bs(age, knots = c(0.97180845450476, 2.4476386036961, 5.38261464750171, 8.50924024640657, 10.5297741273101, 12.6598220396988, 15.047227926078, 17.6459044248872))  +  sex  + bs(hgt, knots = c(67.2106492409876, 82.4828930683183, 101.8, 122.366666666667, 138.103270064571, 151.4, 165.133333333333, 176.449833050697))"
## [1] "target ~  reg  +  sex  + bs(hgt, knots = c(67.2777777777778, 82.3607100919148, 101.433333333333, 122.155555555556, 138.332767375447, 150.466666666667, 164.502896204413, 175.522222222222))  + bs(wgt, knots = c(5.71888888888889, 8.18666666666667, 10.4935047019263, 15.5822189023365, 27.6628339576685, 39.9384109827816, 54.4888888888889, 67.1514003697175))"
## [1] "target ~  reg  + bs(age, knots = c(0.946079549775648, 2.4869777020996, 5.40333611089237, 8.59306097758473, 10.6380713362233, 12.8861510381018, 15.1360559738383, 17.7273163060096))  +  sex  + bs(wgt, knots = c(5.69987106979453, 8.13097303358572, 10.4383333333333, 15.5822189023365, 27.8, 40.5333333333333, 53.9777777777778, 66.9102962144647))"
## [1] "target ~  reg  + bs(age, knots = c(1.00387862194844, 2.4747129059244, 5.17545060460871, 8.36078789261541, 10.3880142976652, 12.6616472735569, 15.0446762498932, 17.6152045835955))  +  sex  + bs(hgt, knots = c(68.4904529070055, 83.3125333857652, 101.638315497017, 121.893703882527, 137.895132591925, 150.864464895046, 164.898123093357, 175.591443474116))"

NAs stats in missing dataset

wgt_nas <- plot_na_pie("wgt")

## [1] 1540

hgt_nas <- plot_na_pie("hgt")

## [1] 1470

age_nas <- plot_na_pie("age")

## [1] 1518

RF: Wight

rf:compare the imputed datasets with orignal dataset

df_rf_wgt <- create_compare_data(data,miss_data,impt_mice_rf_data,nas=wgt_nas,
                                   col = "wgt",method = "rf",sp_impt="method")
ggplot(df_rf_wgt, aes(age,wgt, colour = source))+geom_point(alpha=0.4)+stat_smooth()

ggplot(df_rf_wgt, aes(source,wgt, colour = source))+geom_boxplot()

ggplot(df_rf_wgt, aes(source,wgt, colour = source))+geom_boxplot(aes(colour=sex))

RF:compare split with Sex

df_rf_wgt <- create_compare_data(data,miss_data,impt_mice_rf_data,nas=wgt_nas,col = "wgt",method = "rf",sp_impt="sex")
ggplot(df_rf_wgt, aes(age,wgt, colour = source))+geom_point(alpha=0.4)+stat_smooth()

ggplot(df_rf_wgt, aes(source,wgt, colour = source))+geom_boxplot()

RF:compare by NA counts

ggplot(df_rf_wgt, aes(age,wgt, colour = na_count))+geom_point(alpha=0.4)+stat_smooth()
## Warning: Computation failed in `stat_smooth()`:
## x has insufficient unique values to support 10 knots: reduce k.

ggplot(df_rf_wgt, aes(na_count,wgt, colour = sex))+geom_boxplot()

ggplot(df_rf_wgt[grepl("4:|True",df_rf_wgt$na_count),], aes(age,wgt, colour = na_count))+geom_point(alpha=0.4)+stat_smooth()

b.spline: Wight

b.spline:compare the imputed datasets with orignal dataset

df_spline_wgt <- create_compare_data(data,miss_data,impt_mice_spline_data,nas=wgt_nas,
                                   col = "wgt",method = "b.spline",sp_impt="method")
ggplot(df_spline_wgt, aes(age,wgt, colour = source))+geom_point(alpha=0.4)+stat_smooth()

ggplot(df_spline_wgt, aes(source,wgt, colour = source))+geom_boxplot()

ggplot(df_spline_wgt, aes(source,wgt, colour = source))+geom_boxplot(aes(colour=sex))

b.spline:compare split with Sex

df_spline_wgt <- create_compare_data(data,miss_data,impt_mice_spline_data,nas=wgt_nas,col = "wgt",method = "b.spline",sp_impt="sex")
ggplot(df_spline_wgt, aes(age,wgt, colour = source))+geom_point(alpha=0.4)+stat_smooth()

ggplot(df_spline_wgt, aes(source,wgt, colour = source))+geom_boxplot()

b.spline:compare by NA counts

ggplot(df_spline_wgt, aes(age,wgt, colour = na_count))+geom_point(alpha=0.4)+stat_smooth()
## Warning: Computation failed in `stat_smooth()`:
## x has insufficient unique values to support 10 knots: reduce k.

ggplot(df_spline_wgt, aes(na_count,wgt, colour = sex))+geom_boxplot()

ggplot(df_spline_wgt[grepl("4:|True",df_spline_wgt$na_count),], aes(age,wgt, colour = na_count))+geom_point(alpha=0.4)+stat_smooth()

CART: Wight

CART:compare the imputed datasets with orignal dataset

df_cart_wgt <- create_compare_data(data,miss_data,impt_mice_cart_data,nas=wgt_nas,
                                   col = "wgt",method = "cart",sp_impt="method")
ggplot(df_cart_wgt, aes(age,wgt, colour = source))+geom_point(alpha=0.4)+stat_smooth()

ggplot(df_cart_wgt, aes(source,wgt, colour = source))+geom_boxplot()

ggplot(df_cart_wgt, aes(source,wgt, colour = source))+geom_boxplot(aes(colour=sex))

CART:compare split with Sex

df_cart_wgt <- create_compare_data(data,miss_data,impt_mice_cart_data,nas=wgt_nas,col = "wgt",method = "cart",sp_impt="sex")
ggplot(df_cart_wgt, aes(age,wgt, colour = source))+geom_point(alpha=0.4)+stat_smooth()

ggplot(df_cart_wgt, aes(source,wgt, colour = source))+geom_boxplot()

CART:compare by NA counts

ggplot(df_cart_wgt, aes(age,wgt, colour = na_count))+geom_point(alpha=0.4)+stat_smooth()
## Warning: Computation failed in `stat_smooth()`:
## x has insufficient unique values to support 10 knots: reduce k.

ggplot(df_cart_wgt, aes(na_count,wgt, colour = sex))+geom_boxplot()

ggplot(df_cart_wgt[grepl("4:|True",df_cart_wgt$na_count),], aes(age,wgt, colour = na_count))+geom_point(alpha=0.4)+stat_smooth()

RF: Height

rf:compare the imputed datasets with orignal dataset

df_rf_hgt <- create_compare_data(data,miss_data,impt_mice_rf_data,nas=hgt_nas,
                                   col = "hgt",method = "rf",sp_impt="method")
ggplot(df_rf_hgt, aes(age,hgt, colour = source))+geom_point(alpha=0.4)+stat_smooth()

ggplot(df_rf_hgt, aes(source,hgt, colour = source))+geom_boxplot()

ggplot(df_rf_hgt, aes(source,hgt, colour = source))+geom_boxplot(aes(colour=sex))

RF:compare split with Sex

df_rf_hgt <- create_compare_data(data,miss_data,impt_mice_rf_data,nas=hgt_nas,col = "hgt",method = "rf",sp_impt="sex")
ggplot(df_rf_hgt, aes(age,hgt, colour = source))+geom_point(alpha=0.4)+stat_smooth()

ggplot(df_rf_hgt, aes(source,hgt, colour = source))+geom_boxplot()

RF:compare by NA counts

ggplot(df_rf_hgt, aes(age,hgt, colour = na_count))+geom_point(alpha=0.4)+stat_smooth()
## Warning: Computation failed in `stat_smooth()`:
## x has insufficient unique values to support 10 knots: reduce k.

ggplot(df_rf_hgt, aes(na_count,hgt, colour = sex))+geom_boxplot()

ggplot(df_rf_hgt[grepl("4:|True",df_rf_hgt$na_count),], aes(age,hgt, colour = na_count))+geom_point(alpha=0.4)+stat_smooth()

b.spline: Height

b.spline:compare the imputed datasets with orignal dataset

df_spline_hgt <- create_compare_data(data,miss_data,impt_mice_spline_data,nas=hgt_nas,
                                   col = "hgt",method = "b.spline",sp_impt="method")
ggplot(df_spline_hgt, aes(age,hgt, colour = source))+geom_point(alpha=0.4)+stat_smooth()

ggplot(df_spline_hgt, aes(source,hgt, colour = source))+geom_boxplot()

ggplot(df_spline_hgt, aes(source,hgt, colour = source))+geom_boxplot(aes(colour=sex))

b.spline:compare split with Sex

df_spline_hgt <- create_compare_data(data,miss_data,impt_mice_spline_data,nas=hgt_nas,col = "hgt",method = "b.spline",sp_impt="sex")
ggplot(df_spline_hgt, aes(age,hgt, colour = source))+geom_point(alpha=0.4)+stat_smooth()

ggplot(df_spline_hgt, aes(source,hgt, colour = source))+geom_boxplot()

b.spline:compare by NA counts

ggplot(df_spline_hgt, aes(age,hgt, colour = na_count))+geom_point(alpha=0.4)+stat_smooth()
## Warning: Computation failed in `stat_smooth()`:
## x has insufficient unique values to support 10 knots: reduce k.

ggplot(df_spline_hgt, aes(na_count,hgt, colour = sex))+geom_boxplot()

ggplot(df_spline_hgt[grepl("4:|True",df_spline_hgt$na_count),], aes(age,hgt, colour = na_count))+geom_point(alpha=0.4)+stat_smooth()

CART: Height

CART:compare the imputed datasets with orignal dataset

df_cart_hgt <- create_compare_data(data,miss_data,impt_mice_cart_data,nas=hgt_nas,
                                   col = "hgt",method = "cart",sp_impt="method")
ggplot(df_cart_hgt, aes(age,hgt, colour = source))+geom_point(alpha=0.4)+stat_smooth()

ggplot(df_cart_hgt, aes(source,hgt, colour = source))+geom_boxplot()

ggplot(df_cart_hgt, aes(source,hgt, colour = source))+geom_boxplot(aes(colour=sex))

CART:compare split with Sex

df_cart_hgt <- create_compare_data(data,miss_data,impt_mice_cart_data,nas=hgt_nas,col = "hgt",method = "cart",sp_impt="sex")
ggplot(df_cart_hgt, aes(age,hgt, colour = source))+geom_point(alpha=0.4)+stat_smooth()

ggplot(df_cart_hgt, aes(source,hgt, colour = source))+geom_boxplot()

CART:compare by NA counts

ggplot(df_cart_hgt, aes(age,hgt, colour = na_count))+geom_point(alpha=0.4)+stat_smooth()
## Warning: Computation failed in `stat_smooth()`:
## x has insufficient unique values to support 10 knots: reduce k.

ggplot(df_cart_hgt, aes(na_count,hgt, colour = sex))+geom_boxplot()

ggplot(df_cart_hgt[grepl("4:|True",df_cart_hgt$na_count),], aes(age,hgt, colour = na_count))+geom_point(alpha=0.4)+stat_smooth()

compare miss to true data:wgt

miss_index <- which(is.na(miss_data$wgt))
for (i in 1:5){
  sex <- factor(data$sex[miss_index])
  g1 <- qplot(data$wgt[miss_index],impt_mice_rf_data[[i]]$wgt[miss_index],col=sex)+stat_smooth()+ylim(-10, 105)+
    ylab("rf wgt") + xlab("data wgt")+theme(legend.position = "top")
  
  g2 <- qplot(data$wgt[miss_index],impt_mice_spline_data[[i]]$wgt[miss_index],col=sex)+stat_smooth()+ylim(-10, 105)+
    ylab("b.spline wgt") + xlab("data wgt")+theme(legend.position = "top")
  
  g3 <- qplot(data$wgt[miss_index],impt_mice_cart_data[[i]]$wgt[miss_index],col=sex)+stat_smooth()+ylim(-10, 105)+
    ylab("cart wgt") + xlab("data wgt")+theme(legend.position = "top")
  grid.arrange(g1, g2,g3, ncol=3)
  
}
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

compare miss to true data:hgt

miss_index <- which(is.na(miss_data$hgt))
for (i in 1:5){
  sex <- factor(data$sex[miss_index])
  g1 <- qplot(data$hgt[miss_index],impt_mice_rf_data[[i]]$hgt[miss_index],col=sex)+stat_smooth()+ylim(30, 215)+
    ylab("rf hgt") + xlab("data hgt")+theme(legend.position = "top")
  
  g2 <- qplot(data$hgt[miss_index],impt_mice_spline_data[[i]]$hgt[miss_index],col=sex)+stat_smooth()+ylim(30, 215)+
    ylab("b.spline hgt") + xlab("data hgt")+theme(legend.position = "top")
  
  g3 <- qplot(data$hgt[miss_index],impt_mice_cart_data[[i]]$hgt[miss_index],col=sex)+stat_smooth()+ylim(30, 215)+
    ylab("cart hgt") + xlab("data hgt")+theme(legend.position = "top")
  grid.arrange(g1, g2,g3, ncol=3)
  
}

compare miss to true data:age

miss_index <- which(is.na(miss_data$age))
for (i in 1:5){
  sex <- factor(data$sex[miss_index])
  g1 <- qplot(data$age[miss_index],impt_mice_rf_data[[i]]$age[miss_index],col=sex)+stat_smooth()+ylim(-5,22)+
    ylab("rf age") + xlab("data age")+theme(legend.position = "top")
  
  g2 <- qplot(data$age[miss_index],impt_mice_spline_data[[i]]$age[miss_index],col=sex)+stat_smooth()+ylim(-5,22)+
    ylab("b.spline age") + xlab("data age")+theme(legend.position = "top")
  
  g3 <- qplot(data$age[miss_index],impt_mice_cart_data[[i]]$age[miss_index],col=sex)+stat_smooth()+ylim(-5,22)+
    ylab("cart age") + xlab("data age")+theme(legend.position = "top")
  grid.arrange(g1, g2,g3, ncol=3)
  
}